3.3.79 \(\int \frac {(c+d x^2)^2}{x^4 (a+b x^2)^2} \, dx\) [279]

Optimal. Leaf size=127 \[ \frac {c (5 b c-6 a d)}{3 a^3 x}-\frac {c^2}{3 a x^3 \left (a+b x^2\right )}+\frac {\left (5 b^2 c^2-6 a b c d+3 a^2 d^2\right ) x}{6 a^3 \left (a+b x^2\right )}+\frac {(b c-a d) (5 b c-a d) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{7/2} \sqrt {b}} \]

[Out]

1/3*c*(-6*a*d+5*b*c)/a^3/x-1/3*c^2/a/x^3/(b*x^2+a)+1/6*(3*a^2*d^2-6*a*b*c*d+5*b^2*c^2)*x/a^3/(b*x^2+a)+1/2*(-a
*d+b*c)*(-a*d+5*b*c)*arctan(x*b^(1/2)/a^(1/2))/a^(7/2)/b^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.10, antiderivative size = 125, normalized size of antiderivative = 0.98, number of steps used = 4, number of rules used = 4, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {473, 467, 464, 211} \begin {gather*} \frac {\text {ArcTan}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) (b c-a d) (5 b c-a d)}{2 a^{7/2} \sqrt {b}}+\frac {c (5 b c-6 a d)}{3 a^3 x}+\frac {x \left (\frac {b c (5 b c-6 a d)}{a^2}+3 d^2\right )}{6 a \left (a+b x^2\right )}-\frac {c^2}{3 a x^3 \left (a+b x^2\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d*x^2)^2/(x^4*(a + b*x^2)^2),x]

[Out]

(c*(5*b*c - 6*a*d))/(3*a^3*x) - c^2/(3*a*x^3*(a + b*x^2)) + ((3*d^2 + (b*c*(5*b*c - 6*a*d))/a^2)*x)/(6*a*(a +
b*x^2)) + ((b*c - a*d)*(5*b*c - a*d)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(2*a^(7/2)*Sqrt[b])

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 464

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[c*(e*x)^(m +
 1)*((a + b*x^n)^(p + 1)/(a*e*(m + 1))), x] + Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(a*e^n*(m + 1)), In
t[(e*x)^(m + n)*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[n] ||
GtQ[e, 0]) && ((GtQ[n, 0] && LtQ[m, -1]) || (LtQ[n, 0] && GtQ[m + n, -1])) &&  !ILtQ[p, -1]

Rule 467

Int[(x_)^(m_)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[(-a)^(m/2 - 1)*(b*c - a*d)*x
*((a + b*x^2)^(p + 1)/(2*b^(m/2 + 1)*(p + 1))), x] + Dist[1/(2*b^(m/2 + 1)*(p + 1)), Int[x^m*(a + b*x^2)^(p +
1)*ExpandToSum[2*b*(p + 1)*Together[(b^(m/2)*(c + d*x^2) - (-a)^(m/2 - 1)*(b*c - a*d)*x^(-m + 2))/(a + b*x^2)]
 - ((-a)^(m/2 - 1)*(b*c - a*d))/x^m, x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] &
& ILtQ[m/2, 0] && (IntegerQ[p] || EqQ[m + 2*p + 1, 0])

Rule 473

Int[((e_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^2, x_Symbol] :> Simp[c^2*(e*x)^(m
 + 1)*((a + b*x^n)^(p + 1)/(a*e*(m + 1))), x] - Dist[1/(a*e^n*(m + 1)), Int[(e*x)^(m + n)*(a + b*x^n)^p*Simp[b
*c^2*n*(p + 1) + c*(b*c - 2*a*d)*(m + 1) - a*(m + 1)*d^2*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, p}, x] && Ne
Q[b*c - a*d, 0] && IGtQ[n, 0] && LtQ[m, -1] && GtQ[n, 0]

Rubi steps

\begin {align*} \int \frac {\left (c+d x^2\right )^2}{x^4 \left (a+b x^2\right )^2} \, dx &=-\frac {c^2}{3 a x^3 \left (a+b x^2\right )}+\frac {\int \frac {-c (5 b c-6 a d)+3 a d^2 x^2}{x^2 \left (a+b x^2\right )^2} \, dx}{3 a}\\ &=-\frac {c^2}{3 a x^3 \left (a+b x^2\right )}+\frac {\left (3 d^2+\frac {b c (5 b c-6 a d)}{a^2}\right ) x}{6 a \left (a+b x^2\right )}-\frac {\int \frac {\frac {2 c (5 b c-6 a d)}{a}-\left (\frac {5 b^2 c^2}{a^2}-\frac {6 b c d}{a}+3 d^2\right ) x^2}{x^2 \left (a+b x^2\right )} \, dx}{6 a}\\ &=\frac {c (5 b c-6 a d)}{3 a^3 x}-\frac {c^2}{3 a x^3 \left (a+b x^2\right )}+\frac {\left (3 d^2+\frac {b c (5 b c-6 a d)}{a^2}\right ) x}{6 a \left (a+b x^2\right )}+\frac {((b c-a d) (5 b c-a d)) \int \frac {1}{a+b x^2} \, dx}{2 a^3}\\ &=\frac {c (5 b c-6 a d)}{3 a^3 x}-\frac {c^2}{3 a x^3 \left (a+b x^2\right )}+\frac {\left (3 d^2+\frac {b c (5 b c-6 a d)}{a^2}\right ) x}{6 a \left (a+b x^2\right )}+\frac {(b c-a d) (5 b c-a d) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{7/2} \sqrt {b}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.05, size = 107, normalized size = 0.84 \begin {gather*} -\frac {c^2}{3 a^2 x^3}-\frac {2 c (-b c+a d)}{a^3 x}+\frac {(-b c+a d)^2 x}{2 a^3 \left (a+b x^2\right )}+\frac {\left (5 b^2 c^2-6 a b c d+a^2 d^2\right ) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{7/2} \sqrt {b}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x^2)^2/(x^4*(a + b*x^2)^2),x]

[Out]

-1/3*c^2/(a^2*x^3) - (2*c*(-(b*c) + a*d))/(a^3*x) + ((-(b*c) + a*d)^2*x)/(2*a^3*(a + b*x^2)) + ((5*b^2*c^2 - 6
*a*b*c*d + a^2*d^2)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(2*a^(7/2)*Sqrt[b])

________________________________________________________________________________________

Maple [A]
time = 0.09, size = 107, normalized size = 0.84

method result size
default \(\frac {\frac {\left (\frac {1}{2} a^{2} d^{2}-a b c d +\frac {1}{2} b^{2} c^{2}\right ) x}{b \,x^{2}+a}+\frac {\left (a^{2} d^{2}-6 a b c d +5 b^{2} c^{2}\right ) \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}}}{a^{3}}-\frac {c^{2}}{3 a^{2} x^{3}}-\frac {2 c \left (a d -b c \right )}{a^{3} x}\) \(107\)
risch \(\frac {\frac {\left (a^{2} d^{2}-6 a b c d +5 b^{2} c^{2}\right ) x^{4}}{2 a^{3}}-\frac {c \left (6 a d -5 b c \right ) x^{2}}{3 a^{2}}-\frac {c^{2}}{3 a}}{x^{3} \left (b \,x^{2}+a \right )}+\frac {\left (\munderset {\textit {\_R} =\RootOf \left (a^{7} b \,\textit {\_Z}^{2}+a^{4} d^{4}-12 a^{3} b c \,d^{3}+46 a^{2} b^{2} c^{2} d^{2}-60 a \,b^{3} c^{3} d +25 b^{4} c^{4}\right )}{\sum }\textit {\_R} \ln \left (\left (3 \textit {\_R}^{2} a^{7} b +2 a^{4} d^{4}-24 a^{3} b c \,d^{3}+92 a^{2} b^{2} c^{2} d^{2}-120 a \,b^{3} c^{3} d +50 b^{4} c^{4}\right ) x +\left (-a^{6} d^{2}+6 a^{5} b c d -5 a^{4} b^{2} c^{2}\right ) \textit {\_R} \right )\right )}{4}\) \(232\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x^2+c)^2/x^4/(b*x^2+a)^2,x,method=_RETURNVERBOSE)

[Out]

1/a^3*((1/2*a^2*d^2-a*b*c*d+1/2*b^2*c^2)*x/(b*x^2+a)+1/2*(a^2*d^2-6*a*b*c*d+5*b^2*c^2)/(a*b)^(1/2)*arctan(b*x/
(a*b)^(1/2)))-1/3*c^2/a^2/x^3-2*c*(a*d-b*c)/a^3/x

________________________________________________________________________________________

Maxima [A]
time = 0.49, size = 118, normalized size = 0.93 \begin {gather*} \frac {3 \, {\left (5 \, b^{2} c^{2} - 6 \, a b c d + a^{2} d^{2}\right )} x^{4} - 2 \, a^{2} c^{2} + 2 \, {\left (5 \, a b c^{2} - 6 \, a^{2} c d\right )} x^{2}}{6 \, {\left (a^{3} b x^{5} + a^{4} x^{3}\right )}} + \frac {{\left (5 \, b^{2} c^{2} - 6 \, a b c d + a^{2} d^{2}\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x^2+c)^2/x^4/(b*x^2+a)^2,x, algorithm="maxima")

[Out]

1/6*(3*(5*b^2*c^2 - 6*a*b*c*d + a^2*d^2)*x^4 - 2*a^2*c^2 + 2*(5*a*b*c^2 - 6*a^2*c*d)*x^2)/(a^3*b*x^5 + a^4*x^3
) + 1/2*(5*b^2*c^2 - 6*a*b*c*d + a^2*d^2)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*a^3)

________________________________________________________________________________________

Fricas [A]
time = 0.88, size = 356, normalized size = 2.80 \begin {gather*} \left [-\frac {4 \, a^{3} b c^{2} - 6 \, {\left (5 \, a b^{3} c^{2} - 6 \, a^{2} b^{2} c d + a^{3} b d^{2}\right )} x^{4} - 4 \, {\left (5 \, a^{2} b^{2} c^{2} - 6 \, a^{3} b c d\right )} x^{2} + 3 \, {\left ({\left (5 \, b^{3} c^{2} - 6 \, a b^{2} c d + a^{2} b d^{2}\right )} x^{5} + {\left (5 \, a b^{2} c^{2} - 6 \, a^{2} b c d + a^{3} d^{2}\right )} x^{3}\right )} \sqrt {-a b} \log \left (\frac {b x^{2} - 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right )}{12 \, {\left (a^{4} b^{2} x^{5} + a^{5} b x^{3}\right )}}, -\frac {2 \, a^{3} b c^{2} - 3 \, {\left (5 \, a b^{3} c^{2} - 6 \, a^{2} b^{2} c d + a^{3} b d^{2}\right )} x^{4} - 2 \, {\left (5 \, a^{2} b^{2} c^{2} - 6 \, a^{3} b c d\right )} x^{2} - 3 \, {\left ({\left (5 \, b^{3} c^{2} - 6 \, a b^{2} c d + a^{2} b d^{2}\right )} x^{5} + {\left (5 \, a b^{2} c^{2} - 6 \, a^{2} b c d + a^{3} d^{2}\right )} x^{3}\right )} \sqrt {a b} \arctan \left (\frac {\sqrt {a b} x}{a}\right )}{6 \, {\left (a^{4} b^{2} x^{5} + a^{5} b x^{3}\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x^2+c)^2/x^4/(b*x^2+a)^2,x, algorithm="fricas")

[Out]

[-1/12*(4*a^3*b*c^2 - 6*(5*a*b^3*c^2 - 6*a^2*b^2*c*d + a^3*b*d^2)*x^4 - 4*(5*a^2*b^2*c^2 - 6*a^3*b*c*d)*x^2 +
3*((5*b^3*c^2 - 6*a*b^2*c*d + a^2*b*d^2)*x^5 + (5*a*b^2*c^2 - 6*a^2*b*c*d + a^3*d^2)*x^3)*sqrt(-a*b)*log((b*x^
2 - 2*sqrt(-a*b)*x - a)/(b*x^2 + a)))/(a^4*b^2*x^5 + a^5*b*x^3), -1/6*(2*a^3*b*c^2 - 3*(5*a*b^3*c^2 - 6*a^2*b^
2*c*d + a^3*b*d^2)*x^4 - 2*(5*a^2*b^2*c^2 - 6*a^3*b*c*d)*x^2 - 3*((5*b^3*c^2 - 6*a*b^2*c*d + a^2*b*d^2)*x^5 +
(5*a*b^2*c^2 - 6*a^2*b*c*d + a^3*d^2)*x^3)*sqrt(a*b)*arctan(sqrt(a*b)*x/a))/(a^4*b^2*x^5 + a^5*b*x^3)]

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 248 vs. \(2 (114) = 228\).
time = 0.54, size = 248, normalized size = 1.95 \begin {gather*} - \frac {\sqrt {- \frac {1}{a^{7} b}} \left (a d - 5 b c\right ) \left (a d - b c\right ) \log {\left (- \frac {a^{4} \sqrt {- \frac {1}{a^{7} b}} \left (a d - 5 b c\right ) \left (a d - b c\right )}{a^{2} d^{2} - 6 a b c d + 5 b^{2} c^{2}} + x \right )}}{4} + \frac {\sqrt {- \frac {1}{a^{7} b}} \left (a d - 5 b c\right ) \left (a d - b c\right ) \log {\left (\frac {a^{4} \sqrt {- \frac {1}{a^{7} b}} \left (a d - 5 b c\right ) \left (a d - b c\right )}{a^{2} d^{2} - 6 a b c d + 5 b^{2} c^{2}} + x \right )}}{4} + \frac {- 2 a^{2} c^{2} + x^{4} \cdot \left (3 a^{2} d^{2} - 18 a b c d + 15 b^{2} c^{2}\right ) + x^{2} \left (- 12 a^{2} c d + 10 a b c^{2}\right )}{6 a^{4} x^{3} + 6 a^{3} b x^{5}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x**2+c)**2/x**4/(b*x**2+a)**2,x)

[Out]

-sqrt(-1/(a**7*b))*(a*d - 5*b*c)*(a*d - b*c)*log(-a**4*sqrt(-1/(a**7*b))*(a*d - 5*b*c)*(a*d - b*c)/(a**2*d**2
- 6*a*b*c*d + 5*b**2*c**2) + x)/4 + sqrt(-1/(a**7*b))*(a*d - 5*b*c)*(a*d - b*c)*log(a**4*sqrt(-1/(a**7*b))*(a*
d - 5*b*c)*(a*d - b*c)/(a**2*d**2 - 6*a*b*c*d + 5*b**2*c**2) + x)/4 + (-2*a**2*c**2 + x**4*(3*a**2*d**2 - 18*a
*b*c*d + 15*b**2*c**2) + x**2*(-12*a**2*c*d + 10*a*b*c**2))/(6*a**4*x**3 + 6*a**3*b*x**5)

________________________________________________________________________________________

Giac [A]
time = 0.72, size = 112, normalized size = 0.88 \begin {gather*} \frac {{\left (5 \, b^{2} c^{2} - 6 \, a b c d + a^{2} d^{2}\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a^{3}} + \frac {b^{2} c^{2} x - 2 \, a b c d x + a^{2} d^{2} x}{2 \, {\left (b x^{2} + a\right )} a^{3}} + \frac {6 \, b c^{2} x^{2} - 6 \, a c d x^{2} - a c^{2}}{3 \, a^{3} x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x^2+c)^2/x^4/(b*x^2+a)^2,x, algorithm="giac")

[Out]

1/2*(5*b^2*c^2 - 6*a*b*c*d + a^2*d^2)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*a^3) + 1/2*(b^2*c^2*x - 2*a*b*c*d*x + a
^2*d^2*x)/((b*x^2 + a)*a^3) + 1/3*(6*b*c^2*x^2 - 6*a*c*d*x^2 - a*c^2)/(a^3*x^3)

________________________________________________________________________________________

Mupad [B]
time = 0.13, size = 146, normalized size = 1.15 \begin {gather*} \frac {\mathrm {atan}\left (\frac {\sqrt {b}\,x\,\left (a\,d-b\,c\right )\,\left (a\,d-5\,b\,c\right )}{\sqrt {a}\,\left (a^2\,d^2-6\,a\,b\,c\,d+5\,b^2\,c^2\right )}\right )\,\left (a\,d-b\,c\right )\,\left (a\,d-5\,b\,c\right )}{2\,a^{7/2}\,\sqrt {b}}-\frac {\frac {c^2}{3\,a}-\frac {x^4\,\left (a^2\,d^2-6\,a\,b\,c\,d+5\,b^2\,c^2\right )}{2\,a^3}+\frac {c\,x^2\,\left (6\,a\,d-5\,b\,c\right )}{3\,a^2}}{b\,x^5+a\,x^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*x^2)^2/(x^4*(a + b*x^2)^2),x)

[Out]

(atan((b^(1/2)*x*(a*d - b*c)*(a*d - 5*b*c))/(a^(1/2)*(a^2*d^2 + 5*b^2*c^2 - 6*a*b*c*d)))*(a*d - b*c)*(a*d - 5*
b*c))/(2*a^(7/2)*b^(1/2)) - (c^2/(3*a) - (x^4*(a^2*d^2 + 5*b^2*c^2 - 6*a*b*c*d))/(2*a^3) + (c*x^2*(6*a*d - 5*b
*c))/(3*a^2))/(a*x^3 + b*x^5)

________________________________________________________________________________________